<?php

#namespace Giocondo;

# button -- A widget which executes a command when clicked.
class Button extends Widget {
	protected $options = array(
		'onClicked' => '',
		'text'      => ''
	);

	#const default_option = 'text';
	public $default_option = 'text';

	public function onClicked() {
		return $this->onEvent('onClicked');
	}

	public function display($options=array()) {
		parent::display('onClicked');

		XHtml::element('button', $this->options['text'], array('id' => $this->id));
	}
}

# End of file
# vim: set ts=2 sw=2 noet:
?>
